printk("Error: size:%x, index:%x are invalid!\n", size, index);
domain_crash_synchronous();
break;
-
}
break;
case WORD:
static inline void __set_reg_value(unsigned long *reg, int size, long value)
{
switch (size) {
+ case BYTE:
case BYTE_64:
*reg &= ~0xFF;
*reg |= (value & 0xFF);
*reg = value;
break;
default:
- printk("Error: <__set_reg_value> : Unknown size for register\n");
+ printk("Error: <__set_reg_value>: size:%x is invalid\n", size);
domain_crash_synchronous();
}
}
static inline long __get_reg_value(unsigned long reg, int size)
{
switch(size) {
+ case BYTE:
case BYTE_64:
return (char)(reg & 0xFF);
case WORD:
if (((opcode[1] >> 3) & 7) == 7) { /* cmp $imm, m32/16 */
instr->instr = INSTR_CMP;
- if (opcode[0] == 0x80)
- GET_OP_SIZE_FOR_BYTE(instr->op_size);
- else
- GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
+ if (opcode[0] == 0x80)
+ GET_OP_SIZE_FOR_BYTE(instr->op_size);
+ else
+ GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
instr->operand[0] = mk_operand(instr->op_size, 0, 0, IMMEDIATE);
instr->immediate = get_immediate(vm86, opcode+1, BYTE);